package ecoll.server.data;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable
public class NewsEntity {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;

	@Persistent
	private String user;

	@Persistent
	private String text;

	@Persistent
	private Date date;

	public NewsEntity(String user, String text) {
		this.user = user;
		this.text = text;
		this.date = new Date();
	}

	public Key getKey() {
		return key;
	}

	public String getUser() {
		return user;
	}

	public String getText() {
		return text;
	}

	public Date getDate() {
		return date;
	}
}
